trait is export
Documentation for trait is export assembled from the following types:
class Mu
From Mu
(Mu) trait is export
multi sub trait_mod:<is>(Mu \type, :!)
Marks a type as being exported, that is, available to external users.
my is export
A user of a module or class automatically gets all the symbols imported that are marked as is export.
See Exporting and Selective Importing Modules for more details.
class Routine
From Routine
(Routine) trait is export
multi sub trait_mod:<is>(Routine , :!)
Marks a routine as exported to the rest of the world
module Foo {
sub double($x) is export {
2 * $x
}
}
import Foo; # makes sub double available
say double 21; # 42
From inside another file you'd say use Foo; to load a module and import the exported functions.
See Exporting and Selective Importing Modules for more details.